package com.xl.rentkeeper.act;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.KeyEvent;
import android.view.View;

import com.xl.rentkeeper.R;
import com.xl.rentkeeper.util.Config;


/**
 * Created by Administrator on 2015/7/22.
 */
public class WelcomeAct extends BaseAct{


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.welcome);
        setTranslucentStatus();
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                Intent intent = new Intent(WelcomeAct.this,LoginAct.class);
                startActivity(intent);
                finish();
            }
        }, Config.WELCOME_TIME);
    }

    public void register(View v){
//        Intent intent = new Intent(this,RegisterNo1Act.class);
        Intent intent = new Intent(this,MainActivity.class);
        startActivity(intent);
    }

    public  void  login(View v){
        Intent intent = new Intent(this,LoginAct.class);
        startActivity(intent);
    }

    @Override
    public boolean onBack(int keyCode, KeyEvent event) {
        finish();
        return false;
    }
}
